package com.lemontree.spring.controller;

import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;

@ControllerAdvice
public class ExceptionController {

    @ExceptionHandler(NullPointerException.class)
    public String getNullPointException(ModelMap map) {
        System.out.println("have  NullPoint error!");
        return "index";
    }
}
